#include"last.h"

using namespace std;


snack last(snack lst_snk, int x_, int y_)
{
	if(x_==0&&y_<0)
	{

		lst_snk.y = lst_snk.y + 20;
	}
	if(x_ == 0 && y_ > 0)
	{
		lst_snk.y = lst_snk.y - 20;
	}
	if (x_ > 0 && y_ == 0)
	{
		lst_snk.x = lst_snk.x-20;
	}
	if (x_ < 0 && y_ == 0)
	{
		lst_snk.x = lst_snk.x+20;

	}
	return lst_snk;
}
